package services

import (
	"task_queue/internal/utils"
)

type NotificationService struct {
	EventBus *utils.EventBus
}

func NewNotificationService(eventBus *utils.EventBus) *NotificationService {
	service := &NotificationService{
		EventBus: eventBus,
	}
	service.EventBus.Subscribe("task_status_changed", service.handleTaskStatusChanged)
	return service
}

func (s *NotificationService) handleTaskStatusChanged(event utils.Event) {
	// 处理任务状态变更事件
	// ... existing code ...
}
